﻿@model object
@{
    ViewData.TemplateInfo.HtmlFieldPrefix = ViewData.TemplateInfo.HtmlFieldPrefix.Replace(ViewData.ModelMetadata.PropertyName, "").Trim('.');
    var propertyName = ViewData["name"] == null ? ViewData.ModelMetadata.PropertyName : ViewData["name"].ToString();
    ViewBag.InputAttributes = Html.GetUnobtrusiveValidationAttributes(propertyName, ViewData.ModelMetadata);
}
<tr>
    <td colspan="2">
        <label>
            @ViewData.ModelMetadata.GetDisplayName().Localize()</label>

        @Html.Partial("_RepositoryFolderTree", ViewData["SendingFolders"])
        @Html.ValidationMessage(ViewData.ModelMetadata, new { name = ViewData["name"] })
        @if (!string.IsNullOrEmpty(ViewData.ModelMetadata.Description))
        {
            <em class="tip">@(ViewData.ModelMetadata.Description.Localize())</em>
        }
    </td>
</tr>
